package com.example.wan1.di;

import android.content.Context;

import javax.inject.Named;

import androidx.recyclerview.widget.LinearLayoutManager;
import dagger.Module;
import dagger.Provides;

/***
 * 创建时间：2020/8/26 19:47
 * 创建人：10850
 * 功能描述：
 */
@Module
public class LayoutManagerModule {

    @Named("vertical")
    @Provides
    public LinearLayoutManager providesLinearLayoutManager(Context context) {
        return new LinearLayoutManager(context);
    }

    @Named("horizontal")
    @Provides
    public LinearLayoutManager providesHorizontalLinearLayoutManager(Context context) {
        return new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
    }
}
